load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

rust_library(
    name = "types",
    srcs = glob(["src/**"]),
    crate_name = "ic_crypto_internal_types",
    proc_macro_deps = [
        # Keep sorted.
        "@crate_index//:strum_macros",
    ],
    version = "0.9.0",
    visibility = [
        "//packages/ic-signature-verification:__pkg__",
        "//rs/certification:__pkg__",
        "//rs/certification/test-utils:__pkg__",
        "//rs/crypto:__subpackages__",
        "//rs/registry/admin:__pkg__",
        "//rs/replay:__pkg__",
        "//rs/types/types:__pkg__",
        "//rs/validator/http_request_test_utils:__subpackages__",
    ],
    deps = [
        # Keep sorted.
        "//rs/phantom_newtype",
        "//rs/protobuf",
        "@crate_index//:arrayvec",
        "@crate_index//:hex",
        "@crate_index//:serde",
        "@crate_index//:serde_cbor",
        "@crate_index//:strum",
        "@crate_index//:thiserror",
        "@crate_index//:zeroize",
    ],
)

rust_test(
    name = "types_test",
    crate = ":types",
)
